package com.example.redis.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserDTO implements Serializable {

    private static final long serialVersionUID = -1L;

    public Long id;

    @NotBlank
    private String userName;

    private Integer age;

    @NotNull
    private Integer money;


    public UserDTO(String userName, Integer age) {
        this.userName = userName;
        this.age = age;
    }
}
